
export const setLocalStorageInfo = (key: string, info: any) => {
  localStorage.setItem(key, JSON.stringify(info));
  if (key === 'userInfo') {
    sessionStorage.setItem('token', '1234567')//存储localStorage的同时，也存储一个sessionStorage来监听
  }
}

export const getLocalStorageInfo = (key: string) => {
  return window.localStorage.getItem(key) ?
    JSON.parse(window.localStorage.getItem(key)) :
    null
}
